 /**
 * @(#) StartupCommand.as
 *
 * @date		2009. 02. 25.
 * @version		1.0
 * @author		Shin, Yunwoo
 * @description	Application 시작을 처리하는 Command
 * 				 
 */
package com.skt.common_hr.training.controller
{
	
	import com.skt.common_hr.training.model.ReqTrainingProxy;
	import com.skt.common_hr.training.model.TrainingApprovalProxy;
	import com.skt.common_hr.training.model.TrainingProxy;
	import com.skt.common_hr.training.view.ReqTrainingMediator;
	import com.skt.common_hr.training.view.TrainingMediator;
	
	import org.puremvc.as3.multicore.interfaces.ICommand;
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.patterns.command.SimpleCommand;

	public class StartupCommand extends SimpleCommand implements ICommand
	{
		
		override public function execute(note:INotification):void
		{
			var app:Training = note.getBody() as Training
			trace("execute startupCommand in Work Module");
			
			facade.registerProxy(new ReqTrainingProxy());
			facade.registerProxy(new TrainingProxy());
			facade.registerProxy(new TrainingApprovalProxy());
			
			// MVC 모델중 View와 관련한 mediator들을 등록한다.
			facade.registerMediator(new TrainingMediator(app.view));
			facade.registerMediator(new ReqTrainingMediator(app.view.reqTraining));
		}
	}
}